﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/Management.master" AutoEventWireup="true"
    CodeFile="ArticleCategory.aspx.cs" Inherits="Management_ArticleCategory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table>
        <tr>
            <td>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" GridLines="None">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:TemplateField HeaderText="ID">
                            <ItemTemplate>
                                <%# Eval("ID") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="名称">
                            <ItemTemplate>
                                <%# Eval("Name") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="首页显示">
                            <ItemTemplate>
                                <%# Eval("Default")!=null?(Eval("default").ToString()=="1"?"首页左":""):"" %>
                                <%# Eval("Default")!=null?(Eval("default").ToString()=="2"?"首页中":""):"" %>
                                <%# Eval("Default")!=null?(Eval("default").ToString()=="3"?"首页右":""):"" %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:Button ID="btn_Edit" runat="server" Text="编辑" OnClick="btn_Edit_Click" 
                                    CommandArgument='<%# Eval("ID") %>' />
                                &nbsp;<asp:Button ID="btn_Delete" runat="server" Text="删除" 
                                    OnClick="btn_Delete_Click" CommandArgument='<%# Eval("ID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
                                
                <div class="Dialog" id="panel_Edit" runat="server" visible="false">
                    <div class="Title">
                        添加分类
                    </div>
                    <div class="Content">
                                            <table>
                            <tr>
                                <td class="td">
                                    分类名称:
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_CName" runat="server"></asp:TextBox>
                                    <asp:HiddenField ID="txt_CID" runat="server" />
                                </td>
                            </tr>
                            <tr>
                            <td>首页显示:
                            </td>
                            <td>
                                <asp:DropDownList ID="ddl_Default" runat="server">
                                    <asp:ListItem Selected="True" Value="0">不显示</asp:ListItem>
                                    <asp:ListItem Value="1">首页左</asp:ListItem>
                                    <asp:ListItem Value="2">首页中</asp:ListItem>
                                    <asp:ListItem Value="3">首页右</asp:ListItem>
                                </asp:DropDownList>
                            </td></tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btn_EditSave" runat="server" Text="添加" OnClick="btn_EditSave_Click" CssClass="Button" />
                                &nbsp;<asp:Button ID="btn_EditCancel" runat="server" Text="取消" 
                                        OnClick="btn_EditCancel_Click" CssClass="Button" />
                                </td>
                            </tr>
                        </table>
</div>
                </div>
            </td>
            <td style="vertical-align:top;">
                <asp:Button ID="btn_AddSelect" CssClass="Button" runat="server" Text="添加" 
                    onclick="btn_AddSelect_Click" />
                <div class="Dialog" id="panel_Add" runat="server" visible="false">
                    <div class="Title">
                        添加分类
                    </div>
                    <div class="Content">
                        <table>
                            <tr>
                                <td class="td">
                                    分类名称:
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_Category" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btn_Add" runat="server" Text="添加" OnClick="btn_Add_Click" CssClass="Button" />
                                &nbsp;<asp:Button ID="btn_AddCancel" runat="server" Text="取消" 
                                        OnClick="btn_AddCancel_Click" CssClass="Button" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </td>
        </tr>
    </table>
    <asp:Label ID="lbl_Error" ForeColor="Red" runat="server" EnableViewState="false" ></asp:Label>
</asp:Content>
